package com.zijidelu.luframework.domain.event;

import com.zijidelu.luframework.base.concurrent.ConcurrencyStrategy;
import com.zijidelu.luframework.base.model.Identifiable;

import java.io.Serializable;
import java.time.Instant;

/**
 * 基础领域事件接口。
 *
 * @author ZIJIDELU
 * @datetime 2025/10/14 22:53
 */
public interface DomainEvent<P extends Serializable> extends Identifiable<String> {

    ConcurrencyStrategy getConcurrencyStrategy();

    Instant getOccurredOn();

    String getAggregateType();

    P getPayload();

    // 定义一个模板方法，让子类返回事件名称
    String getEventName();
}
